package com.hcxy.filetransform.domain;

import java.util.Date;

import com.lidroid.xutils.db.annotation.Column;
import com.lidroid.xutils.db.annotation.Id;
import com.lidroid.xutils.db.annotation.Table;
import com.lidroid.xutils.db.annotation.Transient;

@Table(name="transformlog")
public class TransformLog {
	@Id
	private int id;
	@Column(column="type")
	private int type;
	@Column(column="ip")
	private String ip;
	@Column(column="mac")
	private String mac;
	@Column (column="date")
	private Date date;
	@Column(column="data",defaultValue="")
	private String data;
	@Column(column="fromdevicetype",defaultValue="1")
	private int fromdevicetype;
	@Column(column="ispost",defaultValue="1")
	private int ispost;
	/* @Column(column="progress",defaultValue="0") */
	@Transient
	private long progress;
	/* @Column(column="filelength",defaultValue="0") */
	@Transient
	private long filelength;
	@Column(column="isfinish",defaultValue="true")
	private boolean finish;
	@Column(column="filename",defaultValue="test")
	private String fileName;
	
	public String getFileName() {
		return fileName;
	}
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	public long getProgress() {
		return progress;
	}
	public void setProgress(long progress) {
		this.progress = progress;
	}
	public long getFilelength() {
		return filelength;
	}
	public void setFilelength(long filelength) {
		this.filelength = filelength;
	}
	public boolean isFinish() {
		return finish;
	}
	public void setFinish(boolean finish) {
		this.finish = finish;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public String getIp() {
		return ip;
	}
	public void setIp(String ip) {
		this.ip = ip;
	}
	public String getMac() {
		return mac;
	}
	public void setMac(String mac) {
		this.mac = mac;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	public String getData() {
		return data;
	}
	public void setData(String data) {
		this.data = data;
	}
	public int getFromdevicetype() {
		return fromdevicetype;
	}
	public void setFromdevicetype(int fromdevicetype) {
		this.fromdevicetype = fromdevicetype;
	}
	public int getIspost() {
		return ispost;
	}
	public void setIspost(int ispost) {
		this.ispost = ispost;
	}
	public void addProgress(long size){
		progress+=size;
	}
}
